//
//  CYHeadlineTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/1/16.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYHeadlineTableViewCell.h"

@implementation CYHeadlineTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.backView.layer.cornerRadius = 5;
    
    self.backView.layer.shadowColor = [UIColor blackColor].CGColor;//设置阴影的颜色
    self.backView.layer.shadowOpacity = 0.1;//设置阴影的透明度
    self.backView.layer.shadowOffset = CGSizeMake(1, 1);//设置阴影的偏移量
    self.backView.layer.shadowRadius = 5;//设置阴影的圆角
//    self.backView.layer.masksToBounds = YES;
    
    self.headImageView.layer.cornerRadius = self.headImageView.frame.size.height / 2;
    self.headImageView.layer.masksToBounds = YES;
    
}

- (void)setModel:(CYProjectModel *)model{
    _model = model;
    
    if (model) {
        [self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.logo] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.headImageView.frame.size]];
        self.titleLabel.text = model.title;
        
        [self.timeBtn setTitle:[NSString stringWithFormat:@"  %@",model.created_time] forState:UIControlStateNormal];
        [self.liulanBtn setTitle:[NSString stringWithFormat:@"  %@",[model.gbooks stringValue]] forState:UIControlStateNormal];
    }
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
